package designpatterns.memento;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/17/2022 7:37 PM
 */
public class Originator {


    private String state;

    public void setState(String state) {
        this.state = state;
    }

    public String getState() {
        return state;
    }

    public Memento saveStateToMemento() {
        return new Memento(state);
    }

    public void getStateFromMemento(Memento Memento) {
        state = Memento.getState();
    }

}
